package com.gh.yygh.msm.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtils implements InitializingBean {

    @Value(value = "${rckj.accountSId}")
    private String accountSId;
    @Value(value = "${rckj.accountToken}")
    private String accountToken;
    @Value(value = "${rckj.appId}")
    private String appId;
    @Value(value = "${rckj.serverIp}")
    private String serverIp;
    @Value(value = "${rckj.serverPort}")
    private String serverPort;

    public static String ACCOUNT_S_ID;
    public static String ACCOUNT_TOKEN;
    public static String APP_ID;
    public static String SERVER_IP;
    public static String SERVER_PORT;


    @Override
    public void afterPropertiesSet() throws Exception {
        ACCOUNT_S_ID = accountSId;
        ACCOUNT_TOKEN = accountToken;
        APP_ID = appId;
        SERVER_IP = serverIp;
        SERVER_PORT = serverPort;
    }
}
